;;;============================================================================
;;;
;;; Subject: Files Load
;;;         
;;;
;;;----------------------------------------------------------------------------
;;;
;;; Author: Jónathan Heras Vicente
;;; 13/10/09
;;;
;;;============================================================================

(IN-PACKAGE "COMMON-LISP-USER")

(DEFCONSTANT +PUSHOUT-LIST+
    '("AiBjC-rdct"
      "cones2"
      "direct-sum"
      "remove-covers"
      "suspension2"
      "pushout"
      ))

(DO ((i 1 (1+ i))
     (mark +PUSHOUT-LIST+ (cdr mark)))
    ((endp mark) (terpri))
   (format t "~% FILE ~2D: ~A" i (car mark)))

(DEFCONSTANT +P-SOURCE-EXTENSION+
  #+(or allegro clisp lispworks) "cl"
  #-(or allegro clisp lispworks)
    (error "Not an Allegro or CLisp or LispWorks environment."))

(DEFCONSTANT +P-COMPILED-EXTENSION+ 
    #+allegro "fasl"
    #+clisp "fas"
    #+lispworks "ofasl")

(DEFUN LOAD-sFILES ()
   (mapc #'(lambda (file-name)
             (load (concatenate 'string file-name "." +P-source-extension+)))
    +PUSHOUT-LIST+))

(DEFVAR *CMBN-CONTROL*)
(SETF *CMBN-CONTROL* T)

(DEFUN COMPILE-pushoutFILES ()
  (format t "~%*CMBN-CONTROL*  = ~A~2%" *cmbn-control*)
  (mapc #'(lambda (file-name)
            (compile-file (concatenate 'string file-name "." +P-source-extension+))
            (load (concatenate 'string file-name "." +P-compiled-extension+)))
    +PUSHOUT-LIST+))

(DEFUN LOAD-pushoutFILES ()
   (mapc #'(lambda (file-name)
             (load (concatenate 'string file-name "." +P-compiled-extension+)))
    +PUSHOUT-LIST+))
